home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98c.txt
/
000102_icon-group-sender _Mon Dec 7 14:40:25 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id OAA29765
for icon-group-addresses; Mon, 7 Dec 1998 14:40:16 -0700 (MST)
Message-Id: <199812072140.OAA29765@baskerville.CS.Arizona.EDU>
Date: Mon, 07 Dec 1998 10:36:01 -0600
From: MJE <evans@gte.net>
To: icon-group@optima.CS.Arizona.EDU
Subject: Re: Past Keyword / Coexpr Help
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
I like Steve Wampler's answer. Since "find" is a generator, presumably
this function will also behave as a generator. I would still lobby for
the "past" keyword, but no complaints.
Mark
Steve Wampler wrote:
>
> You can write your own string analysis function to implement past().
>
> As I understand what you want, the following would work:
>
> procedure past(s)
> suspend (tab(find(s)),match(s))
> end
>
> I'm not convinced you really want a co-expression in your 2nd question, but
> need to think about that some. No doubt someone else will have a good
> solution soon!
>
> --
> Steve Wampler - swampler@gemini.edu [Gemini 8m Telescopes Project (under AURA)]
> The gods that smiled at your birth are now laughing openly. (Fortune Cookie)
Nevin Liber wrote:
>
> > The scanning mechanism I want would perhaps be called "past", as in
> >
> > numberchars := (&digits ++ 'e' ++ 'E' ++ '+' ++ '-' ++ '.')
> > string ?
> > {
> > tab(past("substring"))
> > result := real(tab(many(numberchars)))
> > }
>
> It has find(), and it is fairly trivial to write past() using find. Here
> you go:
>
> procedure past(s1, s2, i1, i2)
>
> suspend find(s1, s2, i1, i2) + *s1
>
> end
> __
> Nevin ":-)" Liber <mailto:nliber@aivia.com> (312) 855-1000 x199
>
> National Systems Corporation
> 414 North Orleans Street, Suite 501
> Chicago, IL 60610-4490
> fax: (312) 222-1605
> <http://www.aivia.com/>